import request from '@/request'
import type { LoginForm, UserInfo } from '@/types'

export const loginAPI = (data: LoginForm): Promise<UserInfo> => {
  return request({
    url: '/user/login',
    method: 'POST',
    data,
  })
}

export const logoutAPI = () => {
  return request({
    url: '/user/logout',
    method: 'GET',
  })
}
